|
CruiseControl.NET : External Source Control
This page last changed on Feb 25, 2009 by williams.
External Source Control Configuration
Typical / Minimal ConfigurationFor most uses the following is all you'll need in your ccnet.config: <sourcecontrol type="external"> <executable>path to command-line application</executable> </sourcecontrol> This will:
Full Configuration<sourcecontrol type="external"> <executable>path to command-line application</executable> <args>arguments for the command-line application</args> <autoGetSource>false</autoGetSource> <labelOnSuccess>false</labelOnSuccess> <environment> <var>name=value</var> <var>name=value</var> ... </environment> <timeout units="minutes">10</timeout> </sourcecontrol>
OperationEach of the three sourcecontrol operations (GetModifications(), GetSource(), and LabelSourceControl()) are passed to the source control command as a command line. GetModificationsThe GetModifications function is invoked as the GETMODS operation, and specifying a starting and ending timestamp:
The source control command should search for modifications between these two times inclusively, write their details to the standard output stream in the XML format used by the Modification Writer Task, and exit with exit status 0 (any other status indicates an error and will fail the build). For example, the following represents two modifications, numbered 12244 and 12245. <?xml version="1.0" encoding="utf-8"?> <ArrayOfModification> <Modification> <ChangeNumber>12245</ChangeNumber> <Comment>New Project for testing stuff</Comment> <EmailAddress>JUser@Example.Com</EmailAddress> <FileName>AssemblyInfo.cs</FileName> <FolderName>Dev\Server\Interface\Properties\</FolderName> <ModifiedTime>2006-11-22T11:11:00-0500</ModifiedTime> <Type>add</Type> <UserName>joe_user</UserName> <Url>http://www.example.com/index.html</Url> <Version>5</Version> </Modification> <Modification> <ChangeNumber>12244</ChangeNumber> <Comment>New Project for accessing web services</Comment> <EmailAddress>SSpade@Example.Com</EmailAddress> <FileName>Interface</FileName> <FolderName>Dev\Server\</FolderName> <ModifiedTime>2006-11-22T11:10:44-0500</ModifiedTime> <Type>add</Type> <UserName>sam_spade</UserName> <Url>http://www.example.com/index.html</Url> <Version>4</Version> </Modification> </ArrayOfModification> GetSourceThe GetSource function is invoked as the GETSOURCE operation, and specifying a working directory path and the target timestamp:
The source control command should update the files in the specified working directory to the versions current as of the specified time stamp and exit with exit status 0 (any other status indicates an error and will fail the build). LabelSourceControlThe LabelSourceControl function is invoked as the SETLABEL operation, and specifying a label to be applied and the target timestamp:
The source control command should add the label to source repository and exit with exit status 0 (any other status indicates an error and will fail the build).
|
| Document generated by Confluence on Mar 14, 2009 02:55 |